<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>sim.generateShapefromPath</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simGenerateShapeFromPath" id="simGenerateShapeFromPath"></a>simGenerateShapeFromPath / sim.generateShapefromPath</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Generates an extrusion shape from a path. See also the other <a href="../apiFunctions.htm#paths">path related functions</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn><div>simInt simGenerateShapeFromPath(const simFloat* path,simInt pathSize,const simFloat* section,simInt sectionSize,simInt options,const simFloat* upVector,simFloat reserved)</div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>path</strong>: the path, specified in row-major order, with x/y/z/qx/qy/qz/qw values for each path point.  The orientation parts for each path point are ignored if the two first bits of <strong>options</strong> are zero.</div>
<div><strong>pathSize</strong>: the size/length of the path pointer</div>
<div><strong>section</strong>: the extrusion profile, with x/y pairs, e.g. x1,y1,x2,y2,..,xn,yn. If the first and last pair overlap, the section is closed</div>
<div><strong>sectionSize</strong>: the size/length of the section pointer</div>
<div><strong>options</strong>: bit-coded: bit0-bit1: 0=upVector is <strong>upVector</strong>, 1=upVector is the x-axis of the path point frame, 2=upVector is the y-axis of the path point frame, 3=upVector is the z-axis of the path point frame. If bit2 is set (4), the path is closed.</div>
<div><strong>upVector</strong>: a vector that identifies the up-side of the extrusion shape. Can be nullptr if the two first bits of <strong>options</strong> are non-zero.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div><strong>shapeHandle</strong>: the handle of the generated shape</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>int shapeHandle=sim.generateShapeFromPath(table[] path,table[] section,int options=0,table[3] upVector={0.0,0.0,1.0})</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
Similar to the C-function counterpart
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
Similar to the C-function counterpart
</td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
